<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1.0">
		<title></title>
	</head>
	<body>
		<script>
			document.title = "新生群分配"

			let newDiv = document.createElement("div")
			let newInput = document.createElement("input")
			let newButton = document.createElement("button")
			let newDiv2 = document.createElement("div")

			newDiv2.id = "result"
			newInput.id = "xh"
			// newInput.type="number"
			newInput.placeholder = "请输入学号"
			newInput.style.cssText = `border: 1px solid #ff5500;
							border-top-left-radius: 20px;
							border-bottom-left-radius: 20px;
							padding: 0 10px;
							height: 30px;
							float: left;
							width:70%;
							max-width:400px;
							outline: none;`
			newDiv.appendChild(newInput)


			newButton.src = "https://www.wjx.cn/vj/riPVVNP.aspx?width=795&source=iframe&s=t"
			newButton.style.cssText = `border-radius: 0;
							border: 0;
							height: 32px;
							border-top-right-radius: 20px;
							padding: 0 20px;
							background-color: #ff5500;
							border: 1px solid #ff5500;
							width:20%;
							max-width:150px;
							color: #FFF;
							border-bottom-right-radius: 20px;`
			newButton.innerHTML = "确定"
			newButton.onclick = function() {
				let xh = String(document.getElementById("xh").value)
				if (xh.length != 12) {
					alert("位数错误，请检查");
					return;
				}
				let year = xh.slice(0, 2);
				let classNum = Number(xh.slice(8, 10));
				let num = xh.slice(10, 12);
				if (year != 22 || classNum > 15 || classNum < 0) {
					alert("数据错误，请检查");
					return;
				}
				let result = ""
				let qunNum = ""
				let zhang = ""
				switch (classNum) {
					case 1:
						result = "https://jq.qq.com/?_wv=1027&k=0ZBjEUO1"; //
						qunNum = "613541850"; //
						zhang = "刘文帅" //
						break;
					case 2:
						result = "https://jq.qq.com/?_wv=1027&k=7wm6hzWc"; //
						qunNum = "564363447"; //
						zhang = "王凯" //
						break;
					case 3:
						result = "https://jq.qq.com/?_wv=1027&k=0gHd8nMf"; //
						qunNum = "613118123"; //
						zhang = "梁雨辰" //
						break;
					case 4:
						result = "https://jq.qq.com/?_wv=1027&k=P75YngdO";
						qunNum = "561536844";
						zhang = "马欢欢" //
						break;
					case 5:
						result = "https://jq.qq.com/?_wv=1027&k=2XummrjC";
						qunNum = "613632479";
						zhang = "周子健" //
						break;
					case 6:
						result = "https://jq.qq.com/?_wv=1027&k=33ZPbFjE";
						qunNum = "107852997";
						zhang = "邹玉恒" //
						break;
					case 7:
						result = "https://jq.qq.com/?_wv=1027&k=2dzLYFrr";
						qunNum = "835912261";
						zhang = "李东晁" //
						break;
					case 8:
						result = "https://jq.qq.com/?_wv=1027&k=AOGpS6w7"; //
						qunNum = "514421542"; //
						zhang = "杨金博、李恩智" //
						break;
					case 9:
						result = "https://jq.qq.com/?_wv=1027&k=apIeIgGo";//
						qunNum = "829053653";//
						zhang = "郭杏毅"//
						break;
					case 10:
						result = "https://jq.qq.com/?_wv=1027&k=uX3srsGX";
						qunNum = "830761078";
						zhang = "郝承奇"
						break;
					case 11:
						result = "https://jq.qq.com/?_wv=1027&k=QqJJsa1t";//
						qunNum = "830786803";//
						zhang = "杨梓杭"//
						break;
					case 12:
						result = "https://jq.qq.com/?_wv=1027&k=3HO9tpIT"; //
						qunNum = "613118123"; //
						zhang = "方稳庆" //
						break;
					case 13:
						result = "https://jq.qq.com/?_wv=1027&k=gjdDNjWI"; //
						qunNum = "575518078";//
						zhang = "王国浩"//
						break;
					case 14:
						result = "https://jq.qq.com/?_wv=1027&k=3Fc8WNo0";//
						qunNum = "830507457";//
						zhang = "李政杭"//
						break;
					case 15:
						result = "https://jq.qq.com/?_wv=1027&k=egrVSMR2";//
						qunNum = "828824645";//
						zhang = "张圣洁"//
						break;
				}
				//https://jq.qq.com/?_wv=1027&k=3HO9tpIT
				//613118123
				console.log(classNum, result)
				document.getElementById("result").innerHTML = `
							<div style="margin: 20px auto;">
							    <div style="border-radius: 10px;">
							        <div style="background-color: #d03428;border-radius: 10px 10px 0 0;padding: 10px 0;" class="">
							            <div style="display: flex;justify-content: center;align-items: center;">
							                <div class="assistant" style="box-sizing:border-box;width: 22px;">
							                    <img class="assistant" style="max-width: 100% !important;box-sizing:border-box;vertical-align:inherit;width: 100%; display: block;" src="https://bcn.135editor.com/files/images/editor_styles/d7fc11b01543936eef545050178da184.png" data-ratio="0.9428571428571428" data-w="35"/>
							                </div>
							                <div style="font-size: 16px;color: #ffffff;text-align: center;padding: 0 10px;" class="">
							                    <strong class="135brush" data-brushtype="text" >亲爱的22${classNum<10?"0"+classNum:classNum}班同学</strong>
							                </div>
							                <div class="assistant" style="box-sizing:border-box;width: 22px;">
							                    <img class="assistant" style="max-width: 100% !important;box-sizing:border-box;vertical-align:inherit;width: 100%; display: block;" src="https://bcn.135editor.com/files/images/editor_styles/d7fc11b01543936eef545050178da184.png" data-ratio="0.9428571428571428" data-w="35"/>
							                </div>
							            </div>
							        </div>
							            <div style="font-size: 14px;color: #333;text-align: center;letter-spacing: 1.5px;padding-top: 5px;">
							                <span class="135brush" data-brushtype="text">欢迎进入河南科技大学软件学院</span>
							            </div>
							            <div style="font-size: 14px;color: #333;text-align: center;letter-spacing: 1.5px;padding-top: 5px;">
							                <span class="135brush" data-brushtype="text"><a href="${result}">请点击此处进入${classNum}班班群</a><br>（群号:${qunNum}）</span>
							            </div>
										<div style="font-size: 14px;color: #333;text-align: center;letter-spacing: 1.5px;padding-top: 5px;">
										    <span class="135brush" data-brushtype="text">开启这段大学时光吧！</span>
										</div>
										<div style="font-size: 14px;color: #333;text-align: center;letter-spacing: 1.5px;padding-top: 5px;">
										    <span class="135brush" data-brushtype="text">${classNum}班代班长是${zhang}</span>
										</div>
										<div style="font-size: 14px;color: #333;text-align: center;letter-spacing: 1.5px;padding-top: 5px;">
										    <span class="135brush" data-brushtype="text">———————————————</span>
										</div>
							            <div style="font-size: 14px;color: #333;text-align: center;letter-spacing: 1.5px;padding-top: 5px;">
							                <span class="135brush" data-brushtype="text">河南科技大学软件学院</span>
							            </div>
							            <div style="font-size: 14px;color: #333;text-align: center;letter-spacing: 1.5px;padding-top: 5px;">
							                <span class="135brush" data-brushtype="text">软件传媒</span>
							            </div>
							        </div>
							    </div>
							</div>
							`

			}

			newDiv.style.fontSize = "0"
			newDiv.appendChild(newButton)
			newDiv.appendChild(newDiv2)
			document.body.appendChild(newDiv)
		</script>
	</body>
</html>
